home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 26 (Anniversary Edition)
/
Volume 26 [Anniversary Edition] - JOGO DISK .iso
/
DEPOSITO
/
REmovido
/
Nave
/
MarsFighter.swf
/
scripts
/
frame_665
/
DoAction_2.as
next >
Wrap
Text File
|
2006-06-13
|
28KB
|
1,047 lines
function kretanje_uspravno(i, k_x, k_y, flag, f)
{
if(_root["au" + i])
{
if(flag == 0 && _root["au" + i]._y <= k_y)
{
_root["au" + i]._y += 7;
_root["au" + i]._x = k_x - 50;
}
if(flag == 0 && _root["au" + i]._y > k_y)
{
flag = 1;
}
if(flag == 1)
{
f += 0.1;
x = Math.cos(f) * 50;
y = Math.sin(f) * 50;
if(_root["au" + i]._x > k_x)
{
_root["au" + i]._rotation = Math.cos(f) * 90;
}
else
{
_root["au" + i]._rotation = (- Math.cos(f)) * 90 + 180;
}
_root["au" + i]._x = k_x + y;
_root["au" + i]._y = k_y + x;
}
if(flag == 1 && _root["au" + i]._x > k_x + 49)
{
flag = 2;
}
if(flag == 2)
{
_root["au" + i]._rotation = 0;
_root["au" + i]._y -= 7;
_root["au" + i]._x = k_x + 50;
if(_root["au" + i]._y < -10)
{
_root["au" + i].play();
}
}
_global["niz_uspravno" + i] = [k_x,k_y,flag,f];
}
if(!_root.boss1 && _global.unistenih_au == 3 && !_global.poginuo)
{
_root.osvezi_au();
}
}
function osvezi_au()
{
_global.unistenih_au = 0;
k_x = random(300) + 100;
k_y = random(300) + 100;
i = 1;
while(i < 4)
{
duplicateMovieClip(_root.au,"au" + i,16384 + (100 + i));
_root["au" + i]._rotation = 180;
_root["au" + i].gotoAndStop(1);
_root["au" + i]._y = -70 - 50 * i;
_global["niz_uspravno" + i] = [k_x,k_y,0,-215.05];
i++;
}
}
function kretanje_8(i, k_x, k_y, flag, f)
{
if(_root["av" + i])
{
if(flag == 0 && _root["av" + i]._x >= k_x)
{
_root["av" + i]._x -= 7;
_root["av" + i]._y = k_y - 50;
}
if(flag == 0 && _root["av" + i]._x < k_x)
{
flag = 1;
}
if(flag == 1)
{
f += 0.17;
x = Math.cos(f) * 50;
y = Math.sin(f) * 50;
if(_root["av" + i]._x > k_x)
{
_root["av" + i]._rotation = Math.cos(f) * 90;
}
else
{
_root["av" + i]._rotation = (- Math.cos(f)) * 90 + 180;
}
_root["av" + i]._x = k_x + y;
_root["av" + i]._y = k_y + x;
}
if(flag == 1 && _root["av" + i]._y < k_y - 49)
{
flag = 2;
}
if(flag == 2)
{
_root["av" + i]._x -= 7;
_root["av" + i]._y = k_y - 50;
if(_root["av" + i]._x < -10)
{
_root["av" + i].play();
}
}
_global["niz_8" + i] = [k_x,k_y,flag,f];
}
if(!_root.boss1 && _global.unistenih_av == 3 && !_global.poginuo)
{
_root.osvezi_8();
}
}
function osvezi_8()
{
_global.unistenih_av = 0;
k_x = random(200) + 150;
k_y = 100 + random(400);
i = 1;
while(i < 4)
{
duplicateMovieClip(_root.av,"av" + i,16384 + (200 + i));
_root["av" + i]._rotation = -90;
_root["av" + i].gotoAndStop(1);
_root["av" + i]._x = 550 + 50 * i;
_global["niz_8" + i] = [k_x,k_y,0,59.83];
i++;
}
}
function kretanje_atg_l(i, k_x, k_y, flag, f)
{
if(_root["atg_l" + i])
{
if(flag == 0 && _root["atg_l" + i]._y <= k_y)
{
_root["atg_l" + i]._y += 7;
_root["atg_l" + i]._x = k_x - 100;
}
if(flag == 0 && _root["atg_l" + i]._y > k_y)
{
flag = 1;
}
if(flag == 1)
{
f += 0.07;
x = Math.cos(f) * 100;
y = Math.sin(f) * 100;
if(_root["atg_l" + i]._x < k_x)
{
_root["atg_l" + i]._x = k_x + y;
_root["atg_l" + i]._y = k_y + x;
_root["atg_l" + i]._rotation = (- Math.cos(f)) * 90 + 180;
}
else
{
_root["atg_l" + i]._rotation = Math.cos(f) * -90 + 180;
_root["atg_l" + i]._x = k_x + y;
_root["atg_l" + i]._y = k_y + 200 - x;
}
}
if(flag == 1 && _root["atg_l" + i]._x > k_x + 99)
{
flag = 2;
}
if(flag == 2)
{
_root["atg_l" + i]._rotation = 180;
_root["atg_l" + i]._y += 7;
_root["atg_l" + i]._x = k_x + 100;
if(_root["atg_l" + i]._y > 510)
{
_root["atg_l" + i].play();
}
}
_global["niz_atg_l" + i] = [k_x,k_y,flag,f];
}
if(!_root.boss1 && _global.unistenih_atg_l == 3 && !_global.poginuo)
{
_root.osvezi_atg_l();
}
}
function osvezi_atg_l()
{
_global.unistenih_atg_l = 0;
k_x = random(250) + 100;
k_y = random(300) + 100;
i = 1;
while(i < 4)
{
duplicateMovieClip(_root.atg,"atg_l" + i,16384 + (300 + i));
_root["atg_l" + i]._rotation = 180;
_root["atg_l" + i].gotoAndStop(1);
_root["atg_l" + i]._y = -70 - 50 * i;
_global["niz_atg_l" + i] = [k_x,k_y,0,-215.15];
i++;
}
}
function detektovanje_sudara_aliena()
{
k = 1;
while(k < 10)
{
objekat = _global.al_niz[k];
if(_root[objekat])
{
if(Math.abs(_root[objekat]._y - _root.ja._y) < 50)
{
if(_root[objekat].hitTest(_root.ja))
{
if(_root.ja._currentframe == 1 && _root[objekat]._currentframe == 1)
{
_root.unisti_aliena(objekat,"mali");
fire.start();
_root.skindanje_hitpoena("avion","hit_poen");
_global.points += 30;
}
}
if(_root[objekat].hitTest(_root.ja))
{
if(_root.ja._currentframe == 2 && _root[objekat]._currentframe == 1)
{
_root.unisti_aliena(objekat,"mali");
fire.start();
_global.points += 30;
_root.skindanje_hitpoena("avion","stit");
}
}
}
}
k++;
}
}
function unisti_aliena(objekat, tip, sredstvo)
{
if(tip === "mali")
{
_root[objekat].play();
}
}
function skindanje_hitpoena(sredstvo, sa)
{
switch(sa)
{
case "hit_poen":
switch(sredstvo)
{
case "avion":
_global.moji_hitpoeni -= 5;
break;
case "metak":
_global.moji_hitpoeni -= 1;
break;
case "sr_metak":
_global.moji_hitpoeni -= 2;
break;
case "boss_metak":
_global.moji_hitpoeni -= 5;
}
break;
case "stit":
switch(sredstvo)
{
case "avion":
_global.moj_stit -= 5;
_root.postavljanje_stita();
break;
case "metak":
_global.moj_stit -= 1;
_root.postavljanje_stita();
break;
case "sr_metak":
_global.moj_stit -= 2;
_root.postavljanje_stita();
break;
case "boss_metak":
_global.moj_stit -= 5;
_root.postavljanje_stita();
}
}
}
function postavljanje_stita()
{
if(_global.moj_stit > 0)
{
_root.ja.gotoAndStop(2);
}
else
{
_root.ja.play();
}
}
function kretanjeMetaka()
{
k = 1;
while(k < _global.br_metkova + 1)
{
_root["m" + k]._y -= 18;
if(_root["m" + k]._y < 60)
{
_root.unisti_metak(k);
}
k++;
}
}
function space_dilej()
{
_global.brojac_space = _global.brojac_space + 1;
if(_global.brojac_space == 4)
{
_global.space = 24;
_global.brojac_space = 0;
}
}
function unisti_metak(br)
{
_root["m" + br]._x = _root["m" + _global.br_metkova]._x;
_root["m" + br]._y = _root["m" + _global.br_metkova]._y;
removeMovieClip(_root["m" + _global.br_metkova]);
_global.br_metkova--;
}
function space()
{
if(_global.spaceset == 1 && _global.space == 24 && _global.keyCont)
{
_global.br_metkova = _global.br_metkova + 1;
duplicateMovieClip(_root.m,"m" + _global.br_metkova,16384 + _global.m_depth);
if(_global.m_depth == 900)
{
_global.m_depth = 500;
}
else
{
_global.m_depth = _global.m_depth + 1;
}
_root["m" + _global.br_metkova]._x = _root.ja._x;
_root["m" + _global.br_metkova]._y = _root.ja._y;
moj_strelk.start();
_global.space = 0;
_global.spaceset = 0;
}
}
function stisnut_space()
{
if(Key.isDown(32))
{
_global.spaceset = 1;
}
}
function provera_pogotka()
{
r = 1;
while(r < 10)
{
k = 1;
while(k < _global.br_metkova + 1)
{
objekat = _global.al_niz[r];
if(Math.abs(_root[objekat]._y - _root["m" + k]._y) < 30 && Math.abs(_root[objekat]._x - _root["m" + k]._x) < 30)
{
if(_root[objekat]._currentframe == 1)
{
_root.unisti_metak(k);
_root[objekat].play();
fire.start();
_global.points += 30;
}
}
k++;
}
r++;
}
if(_root.boss1)
{
k = 1;
while(k < _global.br_metkova + 1)
{
if(Math.abs(_root.boss1._y - _root["m" + k]._y) < 100)
{
if(_root.boss1._currentframe == 1)
{
if(_root["m" + k].hitTest(_root.boss1))
{
_root.unisti_metak(k);
_global.boss1_hitpoeni--;
}
}
}
k++;
}
}
}
function alien_trazenje()
{
_global.snap_random--;
if(_global.snap_random == 0)
{
i = random(_global.al_niz_br.length);
br = _global.al_niz_br[i];
objekat = _global.al_niz[br];
_root.alien_racunaj(br,objekat);
_global.ispaljenih_al_m = _global.ispaljenih_al_m + 1;
_global.al_niz_br.splice(i,1);
_global.snap_random = _global.pucanje;
}
}
function alien_gadjanje(br)
{
if(_global["ispaljivanje" + br] == true)
{
i = 5;
while(i > 0)
{
_root["al_m" + br]._y += _global["nap_y" + br];
_root["al_m" + br]._x += _global["nap_x" + br];
i--;
}
if(_root["al_m" + br]._x > 500)
{
removeMovieClip(_root["al_m" + br]);
}
if(_root["al_m" + br]._x < -100)
{
removeMovieClip(_root["al_m" + br]);
}
if(_root["al_m" + br]._y > 600)
{
removeMovieClip(_root["al_m" + br]);
}
if(_root["al_m" + br]._y < -100)
{
removeMovieClip(_root["al_m" + br]);
}
}
}
function alien_racunaj(br, objekat)
{
duplicateMovieClip(_root.al_m,"al_m" + br,16384 + (400 + br));
_root["al_m" + br]._x = _root[objekat]._x;
_root["al_m" + br]._y = _root[objekat]._y;
x_razlika = _root.ja._x - _root["al_m" + br]._x;
y_razlika = _root.ja._y - _root["al_m" + br]._y;
y_br_koraka = Math.abs(y_razlika * 0.5);
x_br_koraka = Math.abs(x_razlika * 0.5);
srednji_br_koraka = Math.round((x_br_koraka + y_br_koraka) / 2);
_global["nap_x" + br] = x_razlika / srednji_br_koraka;
_global["nap_y" + br] = y_razlika / srednji_br_koraka;
if(_root[objekat]._x > 20 && _root[objekat]._x < 400 && _root[objekat]._y < 400 && _root[objekat]._y > 20)
{
_root["al_m" + br]._alpha = 100;
_global["ispaljivanje" + br] = true;
}
else
{
_root["al_m" + br]._alpha = 0;
}
}
function alien_pogodak(br)
{
if(Math.abs(_root["al_m" + br]._y - _root.ja._y) < 30)
{
if(Math.abs(_root["al_m" + br]._x - _root.ja._x) < 30)
{
if(_root.ja._currentframe == 1)
{
if(_root["al_m" + br]._alpha == 100)
{
_root.skindanje_hitpoena("metak","hit_poen");
removeMovieClip(_root["al_m" + br]);
thumph.start();
}
}
if(_root.ja._currentframe == 2)
{
if(_root["al_m" + br]._alpha == 100)
{
_root.skindanje_hitpoena("metak","stit");
removeMovieClip(_root["al_m" + br]);
thumph.start();
}
}
}
}
}
function detektovanje_sudara_bombe(sr_bomba)
{
k = 1;
while(k < 10)
{
objekat = _global.al_niz[k];
if(_root[objekat])
{
if(Math.abs(_root[objekat]._y - _root.bomba1._y) < 50)
{
if(_root.bomba1._currentframe == 1)
{
if(_root[objekat].hitTest(_root.bomba1))
{
_root.bomba1.play();
explode.start();
}
}
}
if(_root.bomba1._currentframe > 4)
{
_global.bomba_ispaljena = false;
if(_root[objekat].hitTest(_root.bomba1))
{
_root[objekat].play();
fire.start();
_global.points += 30;
}
}
}
k++;
}
if(_root.srednji)
{
if(Math.abs(_root.srednji._y - _root.bomba1._y) < 100)
{
if(_root.srednji._currentframe == 32)
{
if(_root.bomba1._currentframe == 1)
{
if(_root.srednji.hitTest(_root.bomba1))
{
_global.bomba_ispaljena = false;
_root.bomba1.play();
explode.start();
}
}
if(_root.bomba1._currentframe > 4)
{
if(sr_bomba)
{
if(_root.srednji.hitTest(_root.bomba1))
{
_global.srednji_hitpoen -= 6;
_global.sr_bomba = false;
}
}
}
}
}
}
if(_root.boss1)
{
if(Math.abs(_root.boss1._y - _root.bomba1._y) < 150)
{
if(_root.boss1._currentframe == 1)
{
if(_root.bomba1._currentframe == 1)
{
if(_root.boss1.hitTest(_root.bomba1))
{
_global.bomba_ispaljena = false;
_root.bomba1.play();
explode.start();
}
}
if(_root.bomba1._currentframe > 4)
{
if(_global.boss1_bomba)
{
if(_root.boss1.hitTest(_root.bomba1))
{
_global.boss1_hitpoeni -= 6;
_global.boss1_bomba = false;
}
}
}
}
}
}
}
function kretanje_bombe()
{
_root.bomba1._y -= 18;
_root.bomba1._alpha = 100;
if(_root.bomba1._y < 100)
{
_global.bomba_ispaljena = false;
_root.bomba1.play();
explode.start();
}
}
function kretanje_beama()
{
_root.beam1._y -= 24;
_root.beam1._alpha = 100;
if(_root.beam1._y < 0)
{
_global.beam_ispaljen = false;
removeMovieClip(_root.beam1);
}
}
function ispaljivanje_bombe(b)
{
if(b == 65)
{
duplicateMovieClip(_root.bombaOBJ,"bomba1",17586);
_root.bomba1._x = _root.ja._x;
_root.bomba1._y = _root.ja._y;
_root.bomba1._alpha = 100;
_global.sr_bomba = true;
_global.boss1_bomba = true;
_global.bomba_ispaljena = true;
}
if(b == 66)
{
duplicateMovieClip(_root.beamOBJ,"beam1",17485);
_root.beam1._alpha = 0;
_root.beam1._x = _root.ja._x;
_root.beam1._y = _root.ja._y;
_global.sr_beam = true;
_global.boss_beam = true;
_global.beam_ispaljen = true;
strelk1.start();
}
}
function detektovanje_sudara_beama(sr_beam)
{
k = 1;
while(k < 10)
{
objekat = _global.al_niz[k];
if(_root[objekat])
{
if(Math.abs(_root[objekat]._y - _root.beam1._y) < 50)
{
if(_root[objekat].hitTest(_root.beam1))
{
_root[objekat].play();
_global.points += 30;
fire.start();
}
}
}
k++;
}
if(_root.srednji && sr_beam)
{
if(Math.abs(_root.srednji._y - _root.beam1._y) < 50)
{
if(_root.srednji._currentframe == 32)
{
if(_root.beam1.hitTest(_root.srednji))
{
_global.sr_beam = false;
_global.srednji_hitpoen -= 3;
}
}
}
}
if(_root.boss1 && _global.boss_beam)
{
if(Math.abs(_root.boss1._y - _root.beam1._y) < 100)
{
if(_root.boss1._currentframe == 1)
{
if(_root.beam1.hitTest(_root.boss1))
{
_global.boss_beam = false;
_global.boss1_hitpoeni -= 3;
}
}
}
}
}
function set_glava()
{
_root.glava1.Top = "top:" + _global.tops;
_root.glava1.Ime = _global.Ime;
if(_global.moji_hitpoeni < 0)
{
_global.lives--;
if(_global.lives > 0)
{
_global.moji_hitpoeni = 75;
_root.ja.gotoAndPlay(14);
}
else
{
_global.victory = false;
_global.teleport = true;
_root.ja.gotoAndPlay(14);
}
}
if(_root.boss1)
{
if(_global.boss1_hitpoeni < 0)
{
_root.boss1.play();
}
else
{
_root.glava1.boss1_hitbar1._alpha = 100;
boss1_stanje = _global.boss1_hitpoeni * 100 / 60;
_root.glava1.boss1_hitbar1.pokrivac_bosshita1._x = _root.glava1.boss1_hitbar1.boss1_hit1._x + boss1_stanje;
}
}
if(_global.moj_stit < 0)
{
_global.moj_stit = 0;
}
_root.glava1.beam = _global.beama_u_sarzeru;
_root.glava1.stit = _global.moj_stit;
stanje = _global.moji_hitpoeni * 100 / 75;
_root.glava1.moj_hitbar.pokrivac_mog_hita._x = _root.glava1.moj_hitbar.moj_hit._x + stanje;
_root.glava1.bomba = _global.bombi_u_sarzeru;
_root.glava1.points = "rezultat: " + _global.points;
_root.glava1.ja = _global.lives;
}
function kretanje_srednjeg(flag)
{
if(flag == 1)
{
_root.srednji._y -= 1;
}
if(flag == 1 && _root.srednji._y < 400)
{
flag = 2;
_root.srednji.play();
}
if(flag == 2)
{
_root.srednji._y -= 1;
_root.srednji._x -= 1;
}
if(flag == 2 && _root.srednji._y < 350)
{
flag = 3;
}
if(flag == 3)
{
_root.srednji._y -= 1;
}
if(flag == 3 && _root.srednji._y < 150)
{
flag = 4;
}
if(flag == 4)
{
_root.srednji._y -= 1;
_root.srednji._x += 1;
}
if(_root.srednji._y < -20)
{
removeMovieClip(_root.srednji);
_global.srednji_timer = 60;
flag = 1;
}
if(_root.srednji._x < -40)
{
removeMovieClip(_root.srednji);
_global.srednji_timer = 60;
flag = 1;
}
if(_global.srednji_hitpoen < 0)
{
if(_root.srednji._currentframe == 32)
{
_global.srednji_hitpoen = 0;
_global.points += 1000;
_root.srednji.play();
fire.start();
_global.srednji_timer = 60;
flag = 1;
}
}
_global.srednji_flag = flag;
k = 1;
while(k < _global.br_metkova + 1)
{
if(Math.abs(_root["m" + k]._y - _root.srednji._y) < 50)
{
if(_root.srednji._currentframe == 32)
{
if(_root["m" + k].hitTest(_root.srednji))
{
_root.unisti_metak(k);
_global.srednji_hitpoen--;
}
}
}
k++;
}
if(Math.abs(_root.ja._y - _root.srednji._y) < 50)
{
if(_root.srednji._currentframe == 32)
{
if(_root.ja.hitTest(_root.srednji))
{
if(_root.ja._currentframe == 1)
{
_root.skindanje_hitpoena("avion","hit_poen");
}
if(_root.ja._currentframe == 2)
{
_root.skindanje_hitpoena("avion","stit");
}
if(!_global.hitTest_sr)
{
_global.hitTest_sr = true;
_global.srednji_hitpoen -= 5;
}
}
else
{
_global.hitTest_sr = false;
}
}
}
}
function pucanje_srednjeg(sr_p_timer)
{
if(_root.srednji._currentframe == 32 && !_global.poginuo)
{
sr_p_timer--;
}
if(sr_p_timer == 0)
{
sr_p_timer = 36;
i = 1;
while(i < 4)
{
removeMovieClip(_root["sr_alm" + i]);
duplicateMovieClip(_root.al_m,"sr_alm" + i,16384 + (330 + i));
_root["sr_alm" + i]._y = _root.srednji._y;
_root["sr_alm" + i]._x = _root.srednji._x;
i++;
}
x_razlika = _root.ja._x - _root.sr_alm1._x;
y_razlika = _root.ja._y - _root.sr_alm1._y;
y_br_koraka = Math.abs(y_razlika * 0.5);
x_br_koraka = Math.abs(x_razlika * 0.5);
srednji_br_koraka = Math.round((x_br_koraka + y_br_koraka) / 2);
_global.nap_xsr1 = x_razlika / srednji_br_koraka;
_global.nap_ysr1 = y_razlika / srednji_br_koraka;
k = 2;
while(k < 4)
{
_global["nap_ysr" + k] = _global.nap_ysr1 * (k / 3);
_global["nap_xsr" + k] = _global.nap_xsr1 * (k / 1.5);
k++;
}
}
t = 1;
while(t < 4)
{
if(_root["sr_alm" + t])
{
_root["sr_alm" + t]._y += _global["nap_ysr" + t] * 4;
_root["sr_alm" + t]._x += _global["nap_xsr" + t] * 4;
if(Math.abs(_root["sr_alm" + t]._y - _root.ja._y) < 50)
{
if(_root["sr_alm" + t].hitTest(_root.ja))
{
if(_root.ja._currentframe == 1)
{
_root.skindanje_hitpoena("sr_metak","hit_poen");
removeMovieClip(_root["sr_alm" + t]);
thumph.start();
}
if(_root.ja._currentframe == 2)
{
_root.skindanje_hitpoena("sr_metak","stit");
removeMovieClip(_root["sr_alm" + t]);
thumph.start();
}
}
}
}
t++;
}
_global.sr_p_timer = sr_p_timer;
}
function boss()
{
_global.brojac--;
if(_global.brojac == 0)
{
cilj_x = 100 + random(300);
cilj_y = 50 + random(200);
_global.brojac = 14;
nap_x = (cilj_x - _root.boss1._x) / 100;
nap_y = (cilj_y - _root.boss1._y) / 100;
}
i = 1;
while(i < 6)
{
_root.boss1._y += nap_y;
_root.boss1._x += nap_x;
i++;
}
}
function boss_cilj()
{
_global.bos_pucanje_timer--;
if(_global.bos_pucanje_timer == 0)
{
_global.f *= -1;
_global.bos_pucanje_timer = 3;
_global.boss_m = _global.boss_m + 1;
if(_global.boss_m == 10)
{
_global.boss_m = 1;
}
duplicateMovieClip(_root.al_m,"boss_m" + _global.boss_m,16384 + (2660 + _global.boss_m));
_root["boss_m" + _global.boss_m]._y = _root.boss1._y + 65;
_root["boss_m" + _global.boss_m]._x = _root.boss1._x + 25 * _global.f;
x_razlika = _root.ja._x - _root["boss_m" + _global.boss_m]._x;
y_razlika = _root.ja._y - _root["boss_m" + _global.boss_m]._y;
y_br_koraka = Math.abs(y_razlika * 0.5);
x_br_koraka = Math.abs(x_razlika * 0.5);
srednji_br_koraka = Math.round((x_br_koraka + y_br_koraka) / 2);
_global["nap_x_boss_m" + _global.boss_m] = x_razlika / srednji_br_koraka;
_global["nap_y_boss_m" + _global.boss_m] = y_razlika / srednji_br_koraka;
}
}
function boss_m_kretanje()
{
i = 1;
while(i < 12)
{
_root["boss_m" + i]._y += _global["nap_y_boss_m" + i] * 5;
_root["boss_m" + i]._x += _global["nap_x_boss_m" + i] * 5;
if(Math.abs(_root["boss_m" + i]._y - _root.ja._y) < 50)
{
if(_root["boss_m" + i].hitTest(_root.ja))
{
if(_root.ja._currentframe == 1)
{
fire.start();
_root.skindanje_hitpoena("boss_metak","hit_poen");
removeMovieClip(_root["boss_m" + i]);
}
if(_root.ja._currentframe == 2)
{
fire.start();
_root.skindanje_hitpoena("boss_metak","stit");
removeMovieClip(_root["boss_m" + i]);
}
}
}
i++;
}
}
function kretanje_oblaka()
{
_root.t1._y += 10;
_root.t2._y += 10;
_root.t3._y += 10;
if(_root.t1._y > 500)
{
_root.t1._y = _root.t3._y - 395;
e = 1;
while(e < 4)
{
_root.t1["rif" + e]._y = random(400);
_root.t1["rif" + e]._x = random(300);
e++;
}
}
if(_root.t2._y > 500)
{
_root.t2._y = _root.t1._y - 395;
e = 1;
while(e < 4)
{
_root.t2["rif" + e]._y = random(400);
_root.t2["rif" + e]._x = random(300);
e++;
}
}
if(_root.t3._y > 500)
{
_root.t3._y = _root.t2._y - 395;
e = 1;
while(e < 4)
{
_root.t3["rif" + e]._y = random(300);
_root.t3["rif" + e]._x = random(400);
e++;
}
}
}
_global.lives = 3;
_global.pocetak = 50;
_global.moji_hitpoeni = 75;
_global.poginuo = false;
_global.keyCont = true;
_global.flag_life = 0;
_global.bombi_u_sarzeru = 1;
_global.beama_u_sarzeru = 1;
strelk1 = new Sound();
strelk1.attachSound("STRELK");
strelk1.setVolume(10);
moj_strelk = new Sound();
moj_strelk.attachSound("strelk2");
moj_strelk.setVolume(20);
thumph = new Sound();
thumph.attachSound("thumphi");
thumph.setVolume(100);
fire = new Sound();
fire.attachSound("fire2");
fire.setVolume(20);
explode = new Sound();
explode.attachSound("explode3");
explode.setVolume(10);
_root.bazaKraj1.swapDepths(2551);
_root.baza.swapDepths(2550);
_root.teleportT.swapDepths(998);
_root.ja.swapDepths(999);
_root.glava1.swapDepths(2549);
_root.pripravise1.swapDepths(2548);
_global.pauza = 0;
_global.unpauza = 0;
_global.loop = true;
_global.boss1_hitpoeni = 60;
_global.bos_pucanje_timer = 52;
_global.f = 1;
_global.boss_m = 1;
_global.brojac = 28;
_global.srednji_flag = 1;
_global.srednji_timer = 250;
_global.sr_p_timer = 60;
_global.unistenih_au = 0;
_global.unistenih_av = 0;
_global.unistenih_atg_l = 0;
_global.br_teleporta = 6;
_root.osvezi_8();
_root.osvezi_atg_l();
_root.osvezi_au();
_global.br_metkova = 1;
_global.m_depth = 500;
_global.brojac_space = 0;
_global.snap_random = 10;
_global.pucanje = 28;
_global.ispaljenih_al_m = 0;
_global.teleport = false;
_global.al_niz_br = [1,2,3,4,5,6,7,8,9];
_global.al_niz = ["x","av1","av2","av3","au1","au2","au3","atg_l1","atg_l2","atg_l3"];
stop();
p;